<script>
    var str = 'hello';
    var reg = /l/;
    console.log(reg.exec(str));
</script>